package com.fxb.project.exam.one;

import javax.swing.*;
import java.awt.*;

public class Test28 {
    public static void main(String[] args) {
        MyFrame frame = new MyFrame();
    }
}

class MyFrame extends JFrame{
    public MyFrame(){
        setTitle("Test28");
        setSize(400,400);
        setContentPane(new MyPanel());
        setVisible(true);
    }
}

class MyPanel extends JPanel{
    public void paintComponent(Graphics g){
        g.setColor(Color.green);
        g.drawOval(100,100,200,200);
        g.setColor(Color.red);
        g.drawOval(150,150,100,100);
    }
}
